package org.cuit.echo.seon.example;

import org.cuit.echo.seon.example.dao.DepartmentDao;
import org.cuit.echo.seon.example.dao.UserDao;
import org.cuit.echo.seon.example.entity.Department;
import org.cuit.echo.seon.example.entity.User;
import org.cuit.echo.seon.example.factory.DataAccess;

/**
 * @author Seon
 * @version 1.0
 * @since 2024-09-10
 */
public class Client {
    public static void main(String[] args) {
        /*
        不疯魔，不成活！无痴迷，不成功！痴绝之心，可成万事！
         */
        UserDao userDao = DataAccess.createUserDao();
        User user = new User();
        userDao.insert(user);
        System.out.println(
                userDao.getById(2)
        );

        Department department = new Department();
        DepartmentDao departmentDao = DataAccess.createDepartmentDao();
        departmentDao.insert(department);
        System.out.println(
                departmentDao.getById(2)
        );
    }
}
